home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-11-18 | 60.5 KB | 1,721 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Sat, 09 Nov 96 Volume 4 : Issue 19
-
- Today's Topics:
-
- 3-D???
- An other question about Mouse move
- CopyBits performance = ü(window position)?
- Disk swapping problem - floppy reading floppy
- Documentation tool?
- Drawing to MenuBar from SystemTask patch
- FSpExchangeFiles example has a bug?
- FSpExchangeFiles-"safe-save"
- Finding memory leaks in applications using malloc, free, new, delete
- Floating windows with Text Services (NewServiceWindow)
- Flushing volumes from MacsBug
- Ftnchek 2.9.4 as an MPW tool anyone?
- GWorld problem
- GWorlds:
- Globals in PowerPC Assembly Code
- How about INITs
- How to Debug Drag & Drop ?
- How to port Think Pascal 4.0 program to PPC 604e-180?
- ICN# or ICON resource?
- Interrupt level - What am i allowed to do?
- Launch URL form FileMaker?
- Looking for a diff program.
- MacIntosh Toolbox, Def. of calls
- Meaning of error -127 ?
- Moving the mouse cursor!
- NFS client for the Macintosh
- Need program to create and customize installs for Mac
- Of Sprites and GWorlds
- Open Transport from MultiProcessor Task?
- PBCatSearch problem
- Periodic tasks w-o using VBL
- QuickTime CDEF
- Re-entrant problem? Devices and WaitNextEvent?
- Resource Compiler
- Socket library for Macs???
- Strange code generated (CW10)
- TP and CW difference
- Those windows with thin title bars
- Tracking down stray pointers...???
- Unlocking files in AppleScript
- Visual Basic program -> Mac program
- What do you guys use for an installer of your software?
- [Q] Looping WAV files from memory.
- [Q] PBRead and the disk driver...
- [Q] SYNC PowerPC instruction not working in 604e ?
- long date-time record questions
- looking for Vantage text editor
- simple CopyBits question:
-
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
- (marka@ee.mcgill.ca).
-
- The digest is a collection of article threads from the internet
- newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
- csmp.games. It is designed for people who read news semi-regularly and
- want an archive of the discussions. If you don't know what a
- newsgroup is, you probably don't have access to it. Ask your systems
- administrator(s) for details. If you don't have access to news, you
- may still be able to post messages to the group by using a mail server
- like anon.penet.fi (mail help@anon.penet.fi for more information).
-
- Each issue of the digest contains one or more sets of articles (called
- threads), with each set corresponding to a 'discussion' of a particular
- subject. The articles are not edited; all articles included in this digest
- are in their original posted form (as received by our news server at
- ee.mcgill.ca). Article threads are not added to the digest until the last
- article added to the thread is at least two weeks old (this is to ensure that
- the thread is dead before adding it to the digest). Article threads that
- consist of only one message are generally not included in the digest.
-
- The digests can be obtained by email, ftp or through the World Wide Web.
-
- If you want to receive the digest by mail, send email to
- majordomo@ee.mcgill.ca with no subject and one of the following commands
- as body:
-
- help Sends you a summary of commands
- subscribe csmp Adds you to the mailing list
- unsubscribe csmp Removes you from the list
-
- Once you have subscribed, you will automatically receive each new
- issue as it is created.
-
- Back issues are available by ftp from Info-Mac mirror sites in the
- per/csmp subdirectory, e.g.
-
- ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
-
- The contents of all back issues can be searched by accessing the
- following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
-
- http://marvin.stattech.com.au/search.html
-
- They can also be searched through the following URLs, thanks to
- Tim Tuck (Tim.Tuck@sensei.com.au):
-
- http://wais.sensei.com.au/searchform.html
- wais://wais.sensei.com.au:210/csmp?
-
- -------------------------------------------------------
-
- >From lalo7475@saintmarys.edu
- Subject: 3-D???
- Date: 24 Oct 1996 10:06:02 GMT
- Organization: Deja News Usenet Posting Service
-
- I have a great 3-D game in mind and want to start making it. I have
- made a couple of 2-D casino games and one shoot em up. I was
- wondering if I have books on quickdraw 3-D and Tricks of Mac Games
- Gurus, if I was ready to make the Jump straight into 3-D programming
- ?
- Or is there a lot of stuff to programming in 3-D that me, as a new
- programmer, am not ready for?
- I know this question is broad and vague, but I don't have anyone else
- to ask and I have such a good idea that I want to jump on it while
- it's hot. If all I need are books, then I can learn it, but
- does it take more than books?
- Thanks
- Frank La Lone
- - ---------------------------------------------------------------------
- This article was posted to Usenet via the Posting Service at Deja News:
- http://www.dejanews.com/ [Search, Post, and Read Usenet News!]
-
- +++++++++++++++++++++++++++
-
- >From g-kendall@nwu.edu (Brian Kendall)
- Date: Thu, 24 Oct 1996 18:41:11 -0400
- Organization: Programmer
-
- In article <846148235.6748@dejanews.com>, lalo7475@saintmarys.edu wrote:
-
- > I have a great 3-D game in mind and want to start making it. I have
- > made a couple of 2-D casino games and one shoot em up. I was
- > wondering if I have books on quickdraw 3-D and Tricks of Mac Games
- > Gurus, if I was ready to make the Jump straight into 3-D programming
- > ?
- > Or is there a lot of stuff to programming in 3-D that me, as a new
- > programmer, am not ready for?
- > I know this question is broad and vague, but I don't have anyone else
- > to ask and I have such a good idea that I want to jump on it while
- > it's hot. If all I need are books, then I can learn it, but
- > does it take more than books?
- > Thanks
- > Frank La Lone
- > -----------------------------------------------------------------------
- > This article was posted to Usenet via the Posting Service at Deja News:
- > http://www.dejanews.com/ [Search, Post, and Read Usenet News!]
-
- Wow. I want to make a cool 3d game, too.
- It's probably a good idea to use those two books you mentioned (if they
- are a big help, lemme know :). 3d things can be a little hard, though. It
- can be hard to get the perspective right. I want to make a polygon graphic
- game and I have to worry about z-buffering and speed. Since there is a lot
- of math and if-statements involved, it can be slowed down big time.
-
- Someone suggested to me to just go and get some sort of package that has
- ready made 3d code in it that runs right and fast. It seems like a good
- idea (but where's the fun in that?)
-
- As a final tip, I can only say one thing: don't think super duper 3d. A
- macintosh (even a powermac) has it's limits. You can't have a hundred
- really complex 3d objects moving around on the screen at a time unless you
- have the perfect 3d code. I've lost many a good idea by trying to make
- games that don't run fast enough.
-
- Hope this helps.
-
- Brian K.
-
- ãããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããã
- "If you take cranberries and stew them like apple sauce, it tastes
- much more like prunes then rhubarb does." ã Groucho Marx
- ãããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããããã
-
- +++++++++++++++++++++++++++
-
- >From David Matiskella <matiskel@aa.washington.edu>
- Date: Thu, 24 Oct 1996 10:57:50 -0700
- Organization: University of Washington
-
- On 24 Oct 1996 lalo7475@saintmarys.edu wrote:
-
- > I have a great 3-D game in mind and want to start making it. I have
- > made a couple of 2-D casino games and one shoot em up. I was
- > wondering if I have books on quickdraw 3-D and Tricks of Mac Games
- > Gurus, if I was ready to make the Jump straight into 3-D programming
- > ?
- > Or is there a lot of stuff to programming in 3-D that me, as a new
- > programmer, am not ready for?
- > I know this question is broad and vague, but I don't have anyone else
- > to ask and I have such a good idea that I want to jump on it while
- > it's hot. If all I need are books, then I can learn it, but
- > does it take more than books?
- > Thanks
- > Frank La Lone
- > -----------------------------------------------------------------------
- > This article was posted to Usenet via the Posting Service at Deja News:
- > http://www.dejanews.com/ [Search, Post, and Read Usenet News!]
- >
- YOu really should pick up a book on Computer graphics. There are basically
- two types. The mathematically rigourous ones like Foley and Van Dam,
- Watt's books, and a whole bunch of others, these give the theory but often
- don't have much in the line of implemtation info. Then there are the 3d
- game programming books. They give a lot of code but sometimes they do
- weird things.
-
- David Matiskella
- matiskel@aa.washington.edu
-
-
-
- +++++++++++++++++++++++++++
-
- >From bwade@qualia.com (Bretton Wade)
- Date: Fri, 25 Oct 1996 10:38:38 -0400
- Organization: qualia, inc.
-
- In article <g-kendall-2410961841110001@lucky128.nuts.nwu.edu>,
- g-kendall@nwu.edu (Brian Kendall) wrote:
-
- # game and I have to worry about z-buffering and speed. Since there is a lot
-
- You don't necessarily need Z-buffering. Read over the BSP tree FAQ
-
- http://www.qualia.com/bspfaq/
-
- then go get the demo application (windows 95/NT4.0 or MacOS)
-
- ftp://ftp.qualia.com/pub/bspfaq/
-
- which has COMPLETE source code for a basic 3D renderer. This code was
- intended to be demonstrative of principles, and is not built for speed. It
- does not include things like texture mapping, but other publicly available
- source does.
-
- Bretton
-
- --
- Bretton Wade (bwade@qualia.com)
- http://www.qualia.com/~bwade/
-
- +++++++++++++++++++++++++++
-
- >From metals@rapidnet.com (Kevin Stone)
- Date: 25 Oct 1996 17:47:04 -0600
- Organization: RapidNet
-
- : Wow. I want to make a cool 3d game, too.
- : It's probably a good idea to use those two books you mentioned (if they
- : are a big help, lemme know :). 3d things can be a little hard, though. It
- : can be hard to get the perspective right. I want to make a polygon graphic
- : game and I have to worry about z-buffering and speed. Since there is a lot
- : of math and if-statements involved, it can be slowed down big time.
-
- Z-buffering is not really a great idea unless you're rendering several
- thousand polygons in each frame. Depending upon the scene that you're
- rendering, the good ol' Painters algorithm is still the best way to
- go. If you're rendering indoor scenes or scenes where the entire
- screen is getting filled up with polygons, it might be better to use an
- inversed Painters alg... basicly you sort the polygons front-to-back
- and store the polygon's scan-line endpoints in a screen-wide
- edge-list. The main problem is that scan-lines that overlap others will
- need to get clipped, but the final outcome is a list of scan-lines that
- can be rendered without writting any pixel more than once.
-
- : Someone suggested to me to just go and get some sort of package that has
- : ready made 3d code in it that runs right and fast. It seems like a good
- : idea (but where's the fun in that?)
-
- Might be a really good idea for someone who dosn't have the time or
- energy to spend a year writting their own engine. ;)
-
- : As a final tip, I can only say one thing: don't think super duper 3d. A
- : macintosh (even a powermac) has it's limits. You can't have a hundred
- : really complex 3d objects moving around on the screen at a time unless you
- : have the perfect 3d code. I've lost many a good idea by trying to make
- : games that don't run fast enough.
-
- My engine will do about 18,000 texture-mapped 50-pixel triangles per
- second on my 7100-66Mhz PowerMac. In contrast, a low-end SGI will do
- about 100,000 texture-mapped triangles per second. ;) Nintendos
- Ultra 64 will do several hundred-tousand texture-mapped tris per second.
- The new 3DO system coming out next year is boasted to do 500,000
- textured tris/second, or 1,000,000 flat color tris/second.
-
- I think anyone who is serious about writting 3D games is best
- off writting their own engine. Even though it took me a year to write
- my own engine, I also wrote a fairly nice 3D modeler and other tools
- which I could spruce up and sell to the public. I'm also planning to
- licence my engine next year after I spruce it up a bit more.
-
- : Hope this helps.
- : Brian K.
-
- Ditto.
- Brian S. :)
-
- Sincerly,
- Brian Stone
- Stone Entertainment
- metals@rapidnet.com
- Check out our website at:
- http://www.rapidnet.com/~metals/stone-entertainment.html
-
-
- ---------------------------
-
- >From Eric Mailloux <alibaba@accent.net>
- Subject: An other question about Mouse move
- Date: Sat, 19 Oct 1996 12:04:09 -0400
- Organization: Total Net
-
- I try to use the cursor device manager for moving the cursor from a
- point to an other ( thank to Samuel J. W. Leidy for is source code ) but
- I cant link my code. I find a little warnig on the CursorDevice.h file
- they said we cant use cursor device manager on PowerMac because it is
- emulated and the mixed mode manager is wrong. Some one can tell me how
- can I bypass this problem.
-
- Sebastien
-
- +++++++++++++++++++++++++++
-
- >From pbaxter@assitivetech.com (Paul Baxter)
- Date: Mon, 21 Oct 1996 11:10:17 -0500
- Organization: (none)
-
- In article <3268FBF9.1BC2@accent.net>, Eric Mailloux <alibaba@accent.net> wrote:
-
- > I try to use the cursor device manager for moving the cursor from a
- > point to an other ( thank to Samuel J. W. Leidy for is source code ) but
- > I cant link my code. I find a little warnig on the CursorDevice.h file
- > they said we cant use cursor device manager on PowerMac because it is
- > emulated and the mixed mode manager is wrong. Some one can tell me how
- > can I bypass this problem.
- >
- > Sebastien
-
- Hi,
- You need to get the file CursorDevices.Glue.c.
-
- --
- Paul Baxter
- pbaxter@assistivetech.com
-
- +++++++++++++++++++++++++++
-
- >From mhartman@opencluster.com (Michael Hartman)
- Date: Wed, 23 Oct 1996 00:01:48 -0400
- Organization: Open Cluster Software
-
- In article <3268FBF9.1BC2@accent.net>, Eric Mailloux <alibaba@accent.net> wrote:
-
- > I try to use the cursor device manager for moving the cursor from a
- > point to an other ( thank to Samuel J. W. Leidy for is source code ) but
- > I cant link my code. I find a little warnig on the CursorDevice.h file
- > they said we cant use cursor device manager on PowerMac because it is
- > emulated and the mixed mode manager is wrong. Some one can tell me how
- > can I bypass this problem.
- >
- > Sebastien
-
- The latest ETO, #21, has a new version of CursorDevices.h that provides
- the two routines you need for positioning the mouse. Or you can just put
- these lines in your current copy:
-
- pascal OSErr CrsrDevMoveTo(CursorDevicePtr ourDevice, long absX, long absY)
- TWOWORDINLINE(0x7001, 0xAADB);
-
- pascal OSErr CrsrDevNextDevice(CursorDevicePtr *ourDevice)
- TWOWORDINLINE(0x700B, 0xAADB);
-
- Note that these are the "old" names. These should work on all existing
- Power Macs; and I suppose that when/if InterfaceLib is actually corrected
- some year, these old names will be provided for compatibility.
-
- --
-
- Michael Hartman
-
- ---------------------------
-
- >From J.P.Djajadiningrat@IO.TUDelft.NL (J.P. Djajadiningrat)
- Subject: CopyBits performance = ü(window position)?
- Date: 18 Oct 1996 20:41:49 GMT
- Organization: Delft University of Technology
-
- >From measuring frame rates I get the strong impression that CopyBits
- performance strongly depends upon window position on the screen. If this
- is so, can someone tell me the rules, or point me in the right direction?
- (I've read the FAQ but couldn't find anything on window position).
-
- Yes, bitdepth and size of offscreen GWorld and window are already the same.
-
- Tom
-
- +++++++++++++++++++++++++++
-
- >From abrownswor@ea.com (Andrew Brownsword)
- Date: 19 Oct 1996 00:58:04 GMT
- Organization: Electronic Arts (Canada), Inc.
-
- In article <J.P.Djajadiningrat-1810962243300001@io56.pstngw.tudelft.nl>,
- J.P.Djajadiningrat@IO.TUDelft.NL (J.P. Djajadiningrat) wrote:
-
- >From measuring frame rates I get the strong impression that CopyBits
- >performance strongly depends upon window position on the screen. If this
- >is so, can someone tell me the rules, or point me in the right direction?
- >(I've read the FAQ but couldn't find anything on window position).
- >
- >Yes, bitdepth and size of offscreen GWorld and window are already the same.
- >
- >Tom
-
- To make CopyBits run faster you need to ensure that both the source and
- the destination images are aligned on the machine's word boundries. On a
- 680x0 it is sufficient to align both source and destination on 4 byte
- boundries. On the PowerPC there is potential benefit to 8 byte alignment,
- especially if you are doing a straight copy to VRAM (no scaling, palette
- conversion, depth conversion, etc). This means that your window should be
- have a horizontal position divisable by 8 in 8bit, 4 in 16bit, or 2 in
- 32bit. The GWorld routines will ensure that your source is aligned on at
- least 4 byte boundries (possibly 8 or 16, I'm not sure), assuming you are
- copying the entire image.
-
- --
- Andrew Brownsword
- Software Engineer
- Electronic Arts (Canada), Inc.
- - ----------------------------
- "The opinions expressed in this message are my own and don't necessarily reflect those of my employer."
-
- +++++++++++++++++++++++++++
-
- >From David Matiskella <matiskel@aa.washington.edu>
- Date: Fri, 18 Oct 1996 18:44:40 -0700
- Organization: University of Washington
-
- On 18 Oct 1996, Gregory J Hinkle wrote:
-
- > J.P. Djajadiningrat (J.P.Djajadiningrat@IO.TUDelft.NL) wrote:
- > : From measuring frame rates I get the strong impression that CopyBits
- > : performance strongly depends upon window position on the screen. If this
- > : is so, can someone tell me the rules, or point me in the right direction?
- > : (I've read the FAQ but couldn't find anything on window position).
- >
- > : Yes, bitdepth and size of offscreen GWorld and window are already the same.
- >
- > : Tom
- >
- > I believe it is fastest if the origin of the pixmap in memory is
- > divisible by 4. Or X by Y is divisible by four.
- >
- I think develop 11 had an article on it. The article is a bit dated as
- it's pre powermac. That being said On a power mac you want to align to
- doubles if you are going to be using doubles for copying. Your y location
- shouldn't matter. That being said I believe NewGWorld returns a 4 byte
- aligned pixelmap. The solution I have seen is to create a pixmap bigger
- than the one you need and just ignore the first couple columns which are
- not aligned. I am sure that this something that will (maybe already has)
- change in the future.
-
- David Matiskella
- matiskel@aa.washington.edu
-
-
-
- +++++++++++++++++++++++++++
-
- >From squires@crl.com (Scott Squires)
- Date: Fri, 18 Oct 1996 22:25:02 -0800
- Organization: Puffin Designs
-
- In article <abrownswor-1810961759420001@s10142.eac.ea.com>,
- abrownswor@ea.com (Andrew Brownsword) wrote:
-
- >In article <J.P.Djajadiningrat-1810962243300001@io56.pstngw.tudelft.nl>,
- >J.P.Djajadiningrat@IO.TUDelft.NL (J.P. Djajadiningrat) wrote:
- >
- >>From measuring frame rates I get the strong impression that CopyBits
- >>performance strongly depends upon window position on the screen. If this
- >>is so, can someone tell me the rules, or point me in the right direction?
- >>(I've read the FAQ but couldn't find anything on window position).
- >>
- >>Yes, bitdepth and size of offscreen GWorld and window are already the same.
- >>
- >>Tom
- >
- >To make CopyBits run faster you need to ensure that both the source and
- >the destination images are aligned on the machine's word boundries.
-
- You can use routines in QuickDraw to AlignWindows so they snap to
- the correct placement. You can also do an UpdateGWorld and pass it
- global coordniates. It will use the extra bytes of the GWorld rowbytes
- to align it to the window.
-
- -scott
-
-
- Scott Squires "Insert funny stuff here"
- squires@crl.com
- ScottSquir@aol.com
-
-
- +++++++++++++++++++++++++++
-
- >From ghinkle@blue.seas.upenn.edu (Gregory J Hinkle)
- Date: 18 Oct 1996 22:17:47 GMT
- Organization: University of Pennsylvania
-
- J.P. Djajadiningrat (J.P.Djajadiningrat@IO.TUDelft.NL) wrote:
- : From measuring frame rates I get the strong impression that CopyBits
- : performance strongly depends upon window position on the screen. If this
- : is so, can someone tell me the rules, or point me in the right direction?
- : (I've read the FAQ but couldn't find anything on window position).
-
- : Yes, bitdepth and size of offscreen GWorld and window are already the same.
-
- : Tom
-
- I believe it is fastest if the origin of the pixmap in memory is
- divisible by 4. Or X by Y is divisible by four.
-
- --
- *******************************************************************************
- * _/_/_/ _/ _/ | University of Pennsylvania, School of Engineering *
- * _/ _/ _/ _/ |---------------------------------------------------- *
- * _/ _/ _/ | Box 0859 | Drive Defensivly... *
- * _/ _/_/ _/_/_/_/ | 3901 Locust Walk | Buy a Tank. *
- * _/ _/ _/ _/ | Philadelphia, Pa 19104 | --Greg Hinkle-- *
- * _/_/ _/ _/ |-----------------------------------------------------*
- *_______________________| http://homepage.seas.upenn.edu/~ghinkle/ *
- * Greg Hinkle | ghinkle@eniac.seas.upenn.edu *
- *******************************************************************************
-
- +++++++++++++++++++++++++++
-
- >From J.P.Djajadiningrat@IO.TUDelft.NL (J.P. Djajadiningrat)
- Date: 23 Oct 1996 09:03:48 GMT
- Organization: Delft University of Technology
-
- Many thanks to all who replied to my question!
-
- Tom
-
- ---------------------------
-
- >From "Brian Mowatt" <Brian.Mowatt@dial.pipex.com>
- Subject: Disk swapping problem - floppy reading floppy
- Date: 17 Oct 1996 10:28:30 GMT
- Organization: Crocodile Clips Ltd.
-
- Hi.
- My problem is this I wish to run a program from a floppy that requires the
- user to put other floppies in. Because its part of an installation process
- I cant really copy the program to the hard disk and run it from there.
- I'm getting a ridiculous amount of disk swaps - its a REAL pain - and
- unusuable. Im no expert on the mac memory management, but I reckon the mac
- is needing the original (program containing) disk every other line of code,
- in order to know what to do. The solution would probably be to preload ALL
- the code and resource segments i need to use, and lock them somehow - but i
- cant seem to find out how to do this...I can find plenty about locking say
- some data you've put on the heap etc.
- Does anyone know a simple way round this. Something like
- "look here system, load ALL of me, and don't unload me untill i'm finished.
- Just leave me ALONE!"
- my prog. isn't big, and not run for long, so such system unfriendly
- behaviour shouldn't be a problem.
- There must be loads of people who've encountered this problem!
- Thanks in advance.
- --
- Brian.Mowatt@dial.pipex.com
- Software Developer
- Crocodile Clips ltd.
-
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 18 Oct 1996 00:04:27 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- Brian Mowatt wrote:
-
- > Hi. My problem is this I wish to run a program from a floppy
- >that requires the user to put other floppies in. Because its
- >part of an installation process I cant really copy the program
- >to the hard disk and run it from there.
- > I'm getting a ridiculous amount of disk swaps - its a REAL pain
- >- and unusuable. Im no expert on the mac memory management, but
- >I reckon the mac is needing the original (program containing)
- >disk every other line of code, in order to know what to do. The
- >solution would probably be to preload ALL the code and resource
- >segments i need to use, and lock them somehow - but i cant seem
- >to find out how to do this...I can find plenty about locking say
- >some data you've put on the heap etc. Does anyone know a simple
- >way round this. Something like "look here system, load ALL of
- >me, and don't unload me untill i'm finished. Just leave me
- >ALONE!" my prog. isn't big, and not run for long, so such system
- >unfriendly behaviour shouldn't be a problem. There must be loads
- >of people who've encountered this problem! Thanks in advance.
-
- Make your resources preload and non-purgable and you'll probably solve
- your problems.
-
- If after that, you're *still* getting the Disk Switch dialog, you can
- break at the address DskSwtchHook (3EA) points to with this MacsBug
- command:
-
- BR 3EA^ ';DM RA0 iopb'
-
- That will break into MacsBug, right before the File Manager's Disk Switch
- code is run, with the parameter block pointer of the call causing the I/O
- to the offline/ejected disk in register A0. The ';DM RA0 iopb' part of
- that command line tells MacsBug to show you the parameter block.
-
- >From there, you should be able to look at the ioTrap field to see what
- File Manager call is trying to execute and what it is trying to access on
- the offline/ejected disk. ioTrap will either have the A-Trap work in it,
- or if the high nibble isn't "A", then it will have the HFSDispatch trap
- selector in the low byte.
-
- - Jim Luther
-
- +++++++++++++++++++++++++++
-
- >From "Brian Mowatt" <Brian.Mowatt@dial.pipex.com>
- Date: 18 Oct 1996 15:09:19 GMT
- Organization: Crocodile Clips Ltd.
-
- > I wrote:
- >
- > > Hi. My problem is this I wish to run a program from a floppy
- > >that requires the user to put other floppies in. Because its
- > >part of an installation process I cant really copy the program
- > >to the hard disk and run it from there.
- > > I'm getting a ridiculous amount of disk swaps - its a REAL pain
- > >- and unusuable. .. ...
- etc.
- .........There must be loads
- > >of people who've encountered this problem! Can anyone help?
- Thanks in advance.
-
- Jump Long <jumplong@aol.com> replied in in article
- <546vkb$34a@newsbf02.news.aol.com>...
- >
-
- > Make your resources preload and non-purgable and you'll probably solve
- > your problems.
- >
- > If after that, you're *still* getting the Disk Switch dialog, you can
- > break at the address DskSwtchHook (3EA) points to with this MacsBug
- > command:
- >
- > BR 3EA^ ';DM RA0 iopb' ..
-
- .. and a lot more besides
-
- - Jim Luther
-
- Thanks Jim, but unfortunately that doesn't help much. I went through my
- code segements with resedit making them preload no purge, (and
- interestingly i HAD to lock some when i did this or things fell over! -
- strange that it was exactly the same code that normally ran OK, just
- resource attributes altered in resedit..)
- Unfortunately what I know about macsbug could be written on the edge of a
- postage stamp, so the more low level stuff is a bit (though not
- completely!) lost on me. I dont have the time to learn about macsbug do
- you.. or anyone else have and more suggestions?
-
- I though if i preloaded and locked everything all would be OK. But it
- wasnt, and i'm fast running out of ideas!
- Please .. someone!!
-
- Brian.Mowatt@dial.pipex.com
- Software developer.
- Crocodile clips ltd.
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 24 Oct 1996 01:26:21 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- Brian Mowatt wrote:
- >Unfortunately what I know about macsbug could be written on the
- >edge of a postage stamp, so the more low level stuff is a bit
- >(though not completely!) lost on me. I dont have the time to
- >learn about macsbug do you.. or anyone else have and more
- >suggestions?
-
- Take the time to learn MacsBug. It's my favorite debugging tool and with
- it, you'll be able to do things high-level debuggers just dream of.
-
- Jim Luther
- MacsBug is the source level debugger for my assembler
-
- ---------------------------
-
- >From usenet@techtalk.se (Mikael Skogström)
- Subject: Documentation tool?
- Date: 17 Oct 1996 10:04:25 GMT
- Organization: TechTalk
-
- Is there a Mac based documentation tool to ease the documentation
- process associated with software development? For example, an
- application that can interprete C++ and Pascal code, and the use of
- different classes, and turn it into some kind of a flow chart? And
- maybe even display the gathered the information in a number of other
- ways?
- If there isn't such a tool for the Mac, maybe you know of one for PCs?
-
- Mikael
-
- +++++++++++++++++++++++++++
-
- >From usenet@techtalk.se (Mikael Skogström)
- Date: 19 Oct 1996 09:54:59 GMT
- Organization: TechTalk
-
- In article <jordanz-1710960922570001@204.147.232.52>
- jordanz@altura.com (Jordan Zimmerman) writes:
-
- > Object Master is good at this.
-
- Okay. Who's manufacturing it and do I find them on the Net?
-
- Mikael
-
- +++++++++++++++++++++++++++
-
- >From jordanz@altura.com (Jordan Zimmerman)
- Date: Thu, 17 Oct 1996 09:22:26 -0800
- Organization: Altura Software, Inc.
-
- In article <5450b9$78h@epimetheus.algonet.se>, usenet@techtalk.se (Mikael
- Skogström) wrote:
-
- > Is there a Mac based documentation tool to ease the documentation
- > process associated with software development? For example, an
- > application that can interprete C++ and Pascal code, and the use of
- > different classes, and turn it into some kind of a flow chart? And
- > maybe even display the gathered the information in a number of other
- > ways?
- > If there isn't such a tool for the Mac, maybe you know of one for PCs?
- >
- > Mikael
-
- Object Master is good at this.
-
- --
- Jordan Zimmerman
- Altura Software, Inc.
- home page: http://www.altura.com/jordanz
-
- Harry Browne for President!
- http://www.harrybrowne96.org 1 (800) 682 1776
- Stop the Browne Out! Let Harry Browne debate! http://www.twr.com/STBO
-
- +++++++++++++++++++++++++++
-
- >From david_rehring@gdt.com (David Rehring)
- Date: Wed, 23 Oct 1996 17:48:45 -0700
- Organization: GDT Softworks, Inc.
-
- In article <54a8hj$2ct@epimetheus.algonet.se>, usenet@techtalk.se (Mikael
- Skogström) wrote:
-
- >>In article <jordanz-1710960922570001@204.147.232.52>
- >>jordanz@altura.com (Jordan Zimmerman) writes:
- >>
- >>> Object Master is good at this.
- >>
- >>Okay. Who's manufacturing it and do I find them on the Net?
- >>
- >>Mikael
-
- ACI US
-
- try www.acius.com
-
- --
- David Rehring
- Senior Software Engineer
- GDT Softworks, Inc.
- And all around insane guy!
-
- ---------------------------
-
- >From Moritz Borgmann <Moritz_Borgmann@magicvillage.de>
- Subject: Drawing to MenuBar from SystemTask patch
- Date: Fri, 25 Oct 1996 22:56:41 +0100
- Organization: none
-
- I guess this is something for the real mac programming gurus :-)
-
- What I am trying to accomplish is the following: I want to display
- some clock-like information in the menu bar, exactly as system 7.5
- does. This should be updated in real time and look nice, without
- flickering.
-
- So I wrote an INIT which installs two trap patches: DrawMenuBar (tail
- patch) and SystemTask (head patch). The first time the DrawMenuBar
- patch is called, it allocates a new offscreen GWorld via NewGWorld in
- the System heap.
- Apart from that, both patches do exactly the same:
-
- -SetZone(SystemZone()), so that any new data structures will be
- allocated in the system heap and not in the current heap which may be
- any application's heap
- -allocate space for an new CGrafPort via NewPtr
- -open the new CGrafPort via OpenCPort (drawing to this port draws
- directly to the desktop)
- -if necessary, call UpdateGWorld to reflect changes in the size of the
- stuff to be displayed
- -get the current GWorld
- -SetGWorld to the offscreen world
- -draw the stuff
- -set the GWorld back
- -copy the offscreen data into the menu bar area of the new port using
- CopyBits
- -close the new port and dispose of the memory
- -set the current zone back
-
- Most of the time, this works fine. Everything is displayed very
- smoothly, without flicker, the system isn't slowed down. But very
- seldomly, my Mac crashes, and I suspect that my routines are causing
- the trouble. Thus, my question is: Is it safe to do what I'm doing? Am
- I missing something that I should pay attention to? Could I do this in
- a less ugly way (without trap patching)?
-
- Any advice will be greatly appreciated,
-
- Moritz
-
- +++++++++++++++++++++++++++
-
- >From Moritz Borgmann <Moritz_Borgmann@magicvillage.de>
- Date: Sat, 26 Oct 1996 16:24:38 +0100
- Organization: none
-
- Tom Dowdy wrote:
- >you do seem to be missing a set/restore port/device around the open/close
- >c ports.
- >
- >Some apps may assume that the current port doesn't change across a call
- >to SystemTask().
-
- Eh, sorry, I forgot to tell you that I of course DO save/restore the
- port. Anything else would be crashing the mac right away, I guess.
-
- Scott Kevill wrote:
- >Are you calling LockPixels() on the GWorld PixMapHandle before drawing
- >into the GWorld?
-
- Yeah, I do that, too.
- This is what makes me a bit desperate: I seem to obeye all the rules of
- dealing with offscreen graphics, but it still crashes sometimes. Thanks
- anyway for your replies.
-
- Moritz
- Moritz_Borgmann@magicvillage.de
-
- +++++++++++++++++++++++++++
-
- >From scott@www.curtin.edu.au (Scott Kevill)
- Date: Sat, 26 Oct 1996 11:23:46 +0800
- Organization: Curtin University of Technology
-
- In article <32713799.76B8@magicvillage.de>,
- Moritz_Borgmann@magicvillage.de wrote:
-
- :Most of the time, this works fine. Everything is displayed very
- :smoothly, without flicker, the system isn't slowed down. But very
- :seldomly, my Mac crashes, and I suspect that my routines are causing
- :the trouble. Thus, my question is: Is it safe to do what I'm doing? Am
- :I missing something that I should pay attention to? Could I do this in
- :a less ugly way (without trap patching)?
- :
- :Any advice will be greatly appreciated,
-
- Are you calling LockPixels() on the GWorld PixMapHandle before drawing
- into the GWorld?
-
- That's all that comes to mind at the moment.
-
- Hope this helps.
-
- Scott Kevill
- scott@www.curtin.edu.au
-
- :
- :Moritz
-
- +++++++++++++++++++++++++++
-
- >From samizdat@earthlink.net (Chris Kelly)
- Date: Sat, 26 Oct 1996 12:02:05 -0800
- Organization: Samizdat Productions
-
- Have you tried doing your memory allocations just once, instead of each
- time your patch is called?
-
- Hope that helps.
-
- Chris Kelly
-
- In article <32722D35.63A7@magicvillage.de>,
- Moritz_Borgmann@magicvillage.de wrote:
-
- > Tom Dowdy wrote:
- > >you do seem to be missing a set/restore port/device around the open/close
- > >c ports.
- > >
- > >Some apps may assume that the current port doesn't change across a call
- > >to SystemTask().
- >
- > Eh, sorry, I forgot to tell you that I of course DO save/restore the
- > port. Anything else would be crashing the mac right away, I guess.
- >
- > Scott Kevill wrote:
- > >Are you calling LockPixels() on the GWorld PixMapHandle before drawing
- > >into the GWorld?
- >
- > Yeah, I do that, too.
- > This is what makes me a bit desperate: I seem to obeye all the rules of
- > dealing with offscreen graphics, but it still crashes sometimes. Thanks
- > anyway for your replies.
- >
- > Moritz
- > Moritz_Borgmann@magicvillage.de
-
- ---------------------------
-
- >From 100042.2514@compuserve.com (Kevin Ashbridge)
- Subject: FSpExchangeFiles example has a bug?
- Date: Sun, 20 Oct 1996 19:58:57 +0200
- Organization: Rainy Night Software
-
- SmartFriends,
-
- I'm working my way through IM:Files. In the example given to "safe save" a
- document, the code snippet (Listing 1-10; shown below) returns an fBsyErr
- in the final statement when compiled. I don't understand why it should. The
- fBsyErr error occurs when FSpDelete is called, indicating "File busy,
- directory not empty, or working directory control block open". However, the
- code snippet has explicitly called FSClose. What gives?
-
- -- Kevin.
-
-
- myFSpec := myData^^.fileFSSpec; {get FSSpec for existing file}
-
- GetDateTime(myTime); {create a temporary filename}
- NumToString(myTime, myName);
-
- {Find the temporary folder on file's volume; create it if necessary.}
- myErr := FindFolder(myFSpec.vRefNum, kTemporaryFolderType,
- kCreateFolder, myVRef, myDirID);
- IF myErr = noErr THEN {make an FSSpec for temp file}
- myErr := FSMakeFSSpec(myVRef, myDirID, myName, myTSpec);
- IF (myErr = noErr) OR (myErr = fnfErr) THEN{create a temporary file}
- myErr := FSpCreate(myTSpec, 'trsh', 'trsh', smSystemScript);
- IF myErr = noErr THEN {open the newly created file}
- myErr := FSpOpenDF(myTSpec, fsRdWrPerm, myTemp);
- IF myErr = noErr THEN {write data to the data fork}
- myErr := DoWriteData(myWindow, myTemp);
- IF myErr = noErr THEN {close the temporary file}
- myErr := FSClose(myTemp);
- IF myErr = noErr THEN {swap data in the two files}
- myErr := FSpExchangeFiles(myTSpec, myFSpec);
- IF myErr = noErr THEN {delete the temporary file}
- myErr := FSpDelete(myTSpec); <--- fBsyErr here!!
-
-
-
-
- +++++++++++++++++++++++++++
-
- >From "K. J. Bricknell" <brick@spirit.com.au>
- Date: Mon, 21 Oct 1996 17:57:48 +1100
- Organization: Spirit Networks - Canberra, Australia
-
- Kevin Ashbridge wrote:
- >
- > I'm working my way through IM:Files. In the example given to "safe save" a
- > document, the code snippet (Listing 1-10; shown below) returns an fBsyErr
- > in the final statement when compiled ...
-
- Kevin,
-
- That one drove me bonkers for a while, too. The only way I could find
- around it was as as per the following example:
-
- *****************************************************************************
-
- OSErr doWriteFile(WindowPtr windowPtr,Boolean newFile)
- {
- docRecordHandle docRecHdl;
- FSSpec fileSpecActual, fileSpecTemp;
- UInt32 currentTime;
- Str255 tempFileName;
- SInt16 tempFileVolNum, tempFileRefNum;
- SInt32 tempFileDirID;
- OSErr osError;
-
- docRecHdl = (docRecordHandle) GetWRefCon(windowPtr);
- fileSpecActual = (*docRecHdl)->fileFSSpec;
-
- GetDateTime(¤tTime);
- NumToString((SInt32) currentTime,tempFileName);
-
- osError = FindFolder(fileSpecActual.vRefNum,kTemporaryFolderType,
- kCreateFolder &tempFileVolNum,&tempFileDirID);
- if(osError == noErr)
- osError = FSMakeFSSpec(tempFileVolNum,tempFileDirID,tempFileName,
- &fileSpecTemp);
- if(osError == noErr || osError == fnfErr)
- osError = FSpCreate(&fileSpecTemp,'trsh','trsh',smSystemScript);
- if(osError == noErr)
- osError = FSpOpenDF(&fileSpecTemp,fsRdWrPerm,&tempFileRefNum);
- if(osError == noErr)
- osError = doWriteTextData(windowPtr,tempFileRefNum);
- if(osError == noErr)
- osError = FSClose(tempFileRefNum);
- if(osError == noErr)
- osError = FSClose((*docRecHdl)->fileRefNum);// NEW: CLOSE THE ACTUAL
- FILE
- if(osError == noErr)
- osError = FSpExchangeFiles(&fileSpecTemp,&fileSpecActual);
- if(osError == noErr)
- osError = FSpDelete(&fileSpecTemp);
- if(osError == noErr) // THEN OPEN IT AGAIN!
- osError =
- FSpOpenDF(&fileSpecActual,fsRdWrPerm,&(*docRecHdl)->fileRefNum);
-
- if(osError == noErr)
- {
- if(newFile)
- osError = doCopyAppNameResource(windowPtr);
- }
-
- return(osError);
- }
-
- ******************************************************************************
-
- This has all the logic of finding an open door and then closing it
- before opening it again to walk through it. However, it is the only way
- I could get FSpExchangeFiles to behave itself.
-
- I have seen other writings which indicate that there is something amiss
- with either FSpExchangeFiles or the way it is documented. Given your
- experience, I am now convinced that that is the case.
-
- K. J. Bricknell
- Canberra
- Australia
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 24 Oct 1996 01:51:21 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- Kevin Ashbridge wrote:
-
- >I'm working my way through IM:Files. In the example given to
- >"safe save" a document, the code snippet (Listing 1-10; shown
- >below) returns an fBsyErr in the final statement when compiled.
- >I don't understand why it should. The fBsyErr error occurs when
- >FSpDelete is called, indicating "File busy, directory not empty,
- >or working directory control block open". However, the code
- >snippet has explicitly called FSClose. What gives?
-
- The code snippet is wrong. For an good explanation of what
- FSpExchangeFiles and PBExchangeFiles really do, see the Macintosh
- Technical Note "Inside Macintosh Files Errata".
-
- - Jim Luther
-
- ---------------------------
-
- >From Thomas Wurst <zxmjx02@hp22.zdv.uni-tuebingen.de>
- Subject: FSpExchangeFiles-"safe-save"
- Date: Tue, 22 Oct 1996 20:15:12 +0200
- Organization: InterNetNews at ZDV Uni-Tuebingen
-
- Hello all!
-
- To save my documents in a safe way I'm using the "safe-save" mechanism
- described in IM Files (create a temporary file in the trash using the
- number of ticks since startup as filename, write all the data to that file,
- then exchange the document file with the temporary one).
- But after doing so, and then restarting my Mac, I suddenly have all the
- created temporary files (now empty, of course) lurking in my trash!
-
- What I'm wondering right now is this: does the "safe-save" mechanism from
- IM Files all the work for me (including the proper deletion of all the
- temporary files) -- would mean I'm making something wrong in my
- implementation of that example code -- or do I have to delete them on my
- own?
-
- Any comments on this appreciating: Thomas.
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 24 Oct 1996 01:57:31 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- >To save my documents in a safe way I'm using the "safe-save"
- >mechanism described in IM Files (create a temporary file in the
- >trash using the number of ticks since startup as filename,
- >write all the data to that file, then exchange the document
- >file with the temporary one). But after doing so, and then
- >restarting my Mac, I suddenly have all the created temporary
- >files (now empty, of course) lurking in my trash!
- >
- >What I'm wondering right now is this: does the "safe-save"
- >mechanism from IM Files all the work for me (including the
- >proper deletion of all the temporary files) -- would mean I'm
- >making something wrong in my implementation of that example
- >code -- or do I have to delete them on my own?
-
- The code snippet in Inside Macintosh: Files showing how to use
- ExchangeFiles is wrong. See the Macintosh Technical Note "Inside
- Macintosh: Files - Errata" for an explanation of how the ExchangeFiles
- routines really work.
-
- - Jim Luther
-
- +++++++++++++++++++++++++++
-
- >From hooty@odyssee.net (Eric Dorland)
- Date: Thu, 24 Oct 1996 16:28:02 -0400
- Organization: Odyssee Internet
-
- In article
- <Pine.HPP.3.91.961022200121.17090A-100000@hp22.zdv.uni-tuebingen.de>,
- Thomas Wurst <zxmjx02@hp22.zdv.uni-tuebingen.de> wrote:
-
- > Hello all!
- >
- > To save my documents in a safe way I'm using the "safe-save" mechanism
- > described in IM Files (create a temporary file in the trash using the
- > number of ticks since startup as filename, write all the data to that file,
- > then exchange the document file with the temporary one).
- > But after doing so, and then restarting my Mac, I suddenly have all the
- > created temporary files (now empty, of course) lurking in my trash!
- >
- > What I'm wondering right now is this: does the "safe-save" mechanism from
- > IM Files all the work for me (including the proper deletion of all the
- > temporary files) -- would mean I'm making something wrong in my
- > implementation of that example code -- or do I have to delete them on my
- > own?
-
- You have to make sure you delete the temporary file in the code using
- FSpDelete when your done. Check page 1-25, 1-26 in IM: Files for example
- code on how to do it. Right at the end you'll see the FSpDelete.
-
- Eric Dorland
- hooty@odyssee.net
- http://www.odyssee.net/~hooty/
-
- ---------------------------
-
- >From frankkim@antoniades.lcs.mit.edu (Frank Kim)
- Subject: Finding memory leaks in applications using malloc, free, new, delete
- Date: 22 Oct 1996 14:08:12 GMT
- Organization: MIT Laboratory for Computer Science, Cambridge MA
-
- Hi,
-
- What do you guys recommend using for finding memory leaks in
- applications using malloc, free, new, delete?
-
- I've been using ZoneRanger but it doesn't seem to work too well. I am
- hoping to find something like BoundsChecker on the PC.
-
- By the way, ever notice that when you run a program with SIOUX console,
- that the program just freezes when it runs out of memory and you have to
- reboot. Seems like a shortcoming in the way SIOUX was programmed, don't
- you think?
- --
- Frank Kim frankkim@catfish.lcs.mit.edu
- http://cag-www.lcs.mit.edu/~frankkim/
-
-
- +++++++++++++++++++++++++++
-
- >From MWRon@metrowerks.com (MW Ron)
- Date: Tue, 22 Oct 1996 12:19:36 -0400
- Organization: Metrowerks
-
- In article <54ikgc$onm@GRAPEVINE.LCS.MIT.EDU>,
- frankkim@antoniades.lcs.mit.edu (Frank Kim) wrote:
-
- >Hi,
- >
- >What do you guys recommend using for finding memory leaks in
- >applications using malloc, free, new, delete?
-
- Using DebugNew is the way to go.
-
- >By the way, ever notice that when you run a program with SIOUX console,
- >that the program just freezes when it runs out of memory and you have to
- >reboot. Seems like a shortcoming in the way SIOUX was programmed, don't
- >you think?
-
- I have had reports that if you run out of memory before you have written
- any output to SIOUX it will hang when you try to write the error message
- to the SIOUX window because there is not enough memory to initialize the
- managers. If this is the error you mean, I am not sure if this is a
- limitation, bug, or considered user error.
-
- Ron
-
- --
- METROWERKS Ron Liechty
- "Software at Work" MWRon@metrowerks.com
- http://www.metrowerks.com/about/people/rogues.html#mwron
-
- +++++++++++++++++++++++++++
-
- >From awulf@biit.com (Andrew Wulf)
- Date: Tue, 22 Oct 1996 15:59:11 -0500
- Organization: Biit, Inc.
-
- In article <54ikgc$onm@GRAPEVINE.LCS.MIT.EDU>,
- frankkim@antoniades.lcs.mit.edu (Frank Kim) wrote:
-
- >Hi,
- >
- >What do you guys recommend using for finding memory leaks in
- >applications using malloc, free, new, delete?
- >
- >I've been using ZoneRanger but it doesn't seem to work too well.
-
- (1) You can use Metrowerks supplied DebugNew.
-
- (2) For operator new/delete you can edit the file new.cp in the MWCRuntime
- library, and change its setting to use NewPtr/DeletePtr. This way you can
- use ZoneRanger.
-
- >I am hoping to find something like BoundsChecker on the PC.
-
- (3) Soon you can use my product, HeapManager, which includes an allocator
- library with a debugging API, and an external application that displays
- (among it's other features) all current memory allocations that came from
- new/malloc, with the routine name that generated them, the size, the
- address, and the order they were created. It also has a history window
- that shows all allocations and frees in order with the same info. It will
- be shipping in December. See the web page below for more info.
-
- --
- Andrew Wulf
- Biit, Inc.
-
-
-
- +++++++++++++++++++++++++++
-
- >From ax52@cityscape.co.uk (Giuliano Gavazzi)
- Date: Thu, 24 Oct 1996 21:13:25 +0100
- Organization: myself
-
- In article <awulf-2210961559120001@turnpike19.onramp.net>, awulf@biit.com
- (Andrew Wulf) wrote:
-
- ...
- > be shipping in December. See the web page below for more info.
- >
- > --
- > Andrew Wulf
- > Biit, Inc.
-
- below what?
-
-
- Giuliano
-
- +++++++++++++++++++++++++++
-
- >From awulf@biit.com (Andrew Wulf)
- Date: Fri, 25 Oct 1996 09:49:52 -0500
- Organization: Biit, Inc.
-
- In article <ax52-2410962113250001@news3.news.demon.net>,
- ax52@cityscape.co.uk (Giuliano Gavazzi) wrote:
-
- >...
- >> be shipping in December. See the web page below for more info.
- >>
- >> --
- >> Andrew Wulf
- >> Biit, Inc.
- >
- >below what?
-
- Sorry, wrong signature. Try this one:
-
- --
- Andrew Wulf
- Biit, Inc.
- See info on HeapManager at <http://www.biit.com>
-
- ---------------------------
-
- >From grh@umiacs.umd.edu (Gisli R. Hjaltason)
- Subject: Floating windows with Text Services (NewServiceWindow)
- Date: 22 Oct 1996 13:37:06 -0400
- Organization: Dept. of Computer Science, University of Maryland, College Park
-
- I am adding a tool bar to an app that I'm working on. It seemed like the
- floating window service in the Text Services (NewServiceWindow etc.) fit the
- bill for making the tool bar float above the regular app windows. I've
- gotten it to work, but there is one slight problem: if my app crashes, the
- tool bar stays on the screen. Is there any way around this? (Of course, I'd
- like to say that my app is bug-free, but we all know how these pesky bugs
- can lurk around.)
-
- I'd appreciate any advice.
-
- Thanks in advance...
- --
- Gisli Runar Hjaltason \ "Once, in the army, I was asked if I was
- Department of Computer Science \ really the composer Arnold Schoenberg.
- University of Maryland, College Park \ 'Somebody had to be,' I said" Schoenberg
-
- +++++++++++++++++++++++++++
-
- >From baclark@enteract.com (Brian Clark)
- Date: Tue, 22 Oct 1996 15:06:33 -0500
- Organization: Fawlty Software Ltd.
-
- In article <54j0o2$dqv@midgard.umiacs.umd.edu>, grh@umiacs.umd.edu (Gisli
- R. Hjaltason) wrote:
-
- >I am adding a tool bar to an app that I'm working on. It seemed like the
- >floating window service in the Text Services (NewServiceWindow etc.) fit the
- >bill for making the tool bar float above the regular app windows. I've
- >gotten it to work, but there is one slight problem: if my app crashes, the
- >tool bar stays on the screen. Is there any way around this?
-
- My suggestion would be to skip the Text Services floater and use the
- floating windows package from develop magazine. It does not suffer from the
- drawbacks (no color support, can't change cursor when it's over the
- floating window, unusual event handling) that the Text Services floaters
- do. The code from develop is a bit more work to use, but worth it.
-
- --
- Thanks to everyone who has registered YA-NewsWatcher.
- For the latest version (2.3.1) and helper apps, go to:
- ftp://ftp.enteract.com/users/baclark/
-
- +++++++++++++++++++++++++++
-
- >From Jae Ho Chang <jaeho@xs4all.nl>
- Date: Wed, 23 Oct 1996 21:03:11 +0200
- Organization: eMusicas softwares
-
- Gisli R. Hjaltason wrote:
-
- > I've gotten it to work, but there is one slight problem: if my app crashes, the
- > tool bar stays on the screen. Is there any way around this?
-
- This could work well:
- Write a jGNEFilter for the window and put it in the system heap. The
- filter procedure is alive even if your program crashes.
-
- Jae Ho Chang :-)
- --
- Check out the amazing note utility FinderNote at
- <http://www.xs4all.nl/~jaeho/FinderNote>
- eMusicas Home Page <http://www.xs4all.nl/~jaeho/>
-
- - Let's think of the earth -
-
-
- ---------------------------
-
- >From uzs90z@uni-bonn.de (Michael Schuerig)
- Subject: Flushing volumes from MacsBug
- Date: Sun, 20 Oct 1996 01:52:24 +0200
- Organization: RHRZ - University of Bonn (Germany)
-
-
- Is there a way to flush volumes from inside MacsBug? My intention, of
- course, is to write the cache contents to disk after crashing into
- MacsBug, but I don't necessarily want to restart (with rs).
-
- Michael
-
- - -
- Michael Schuerig
- mailto:uzs90z@uni-bonn.de
- http://www.rhrz.uni-bonn.de/~uzs90z/
-
- +++++++++++++++++++++++++++
-
- >From andrewwelc@aol.com (AndrewWelc)
- Date: 21 Oct 1996 07:16:44 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- > Is there a way to flush volumes from inside MacsBug? My intention, of
- > course, is to write the cache contents to disk after crashing into
- > MacsBug, but I don't necessarily want to restart (with rs).
-
- I suppose you could always write a 'dcmd' that attempts to do this.
-
- +--------------------------------------------------------------+
- | Andrew Welch - Thaumaturgist - Ambrosia Software, Inc. |
- +-------------------------------+------------------------------+
- | AOL-> Keyword: Ambrosia | http://www.AmbrosiaSW.com/ |
- | CIS-> GO word: Ambrosia | ftp://ftp.AmbrosiaSW.com/ |
- +-------------------------------+------------------------------+
-
- +++++++++++++++++++++++++++
-
- >From Jim Murphy <murph@apple.com>
- Date: 21 Oct 1996 22:16:59 GMT
- Organization: Apple Computer, Inc.
-
- In article <19961020015224172099@rhrz-ts3-p3.rhrz.uni-bonn.de>
- Michael Schuerig, uzs90z@uni-bonn.de writes:
- >Is there a way to flush volumes from inside MacsBug? My intention, of
- >course, is to write the cache contents to disk after crashing into
- >MacsBug, but I don't necessarily want to restart (with rs).
-
- If you're using MacsBug 6.5.3 (you should be), try logging something
- using the log command. A sequence like this should do the trick:
-
- LOG logvol:dummylogfile; LOG
-
- (Where "logvol" is the volume you want to flush.)
-
- MacsBug 6.5.3 is extremely paranoid about getting what you logged onto
- disk. If it's safe to do so (the file system isn't busy), it will do a
- FlushVol after each line of output is drawn, and also when it closes the
- file. You obviously need to be aware that if the crash in question somehow
- wrote data over the file system cache, there is a chance you could be
- writing bad data back to the disk. Buyer beware.
-
-
- Jim Murphy Dr. MacsBug murph@apple.com
-
- "...never quite said what I wanted to say to you, The Cure
- never quite managed the words to explain to you..." Untitled
-
- +++++++++++++++++++++++++++
-
- >From uzs90z@uni-bonn.de (Michael Schuerig)
- Date: Mon, 21 Oct 1996 22:51:16 +0200
- Organization: RHRZ - University of Bonn (Germany)
-
- AndrewWelc <andrewwelc@aol.com> wrote:
-
- > > Is there a way to flush volumes from inside MacsBug? My intention, of
- > > course, is to write the cache contents to disk after crashing into
- > > MacsBug, but I don't necessarily want to restart (with rs).
- >
- > I suppose you could always write a 'dcmd' that attempts to do this.
-
- So then, does anybody have a dcmd shell for CodeWarrior available?
-
- Michael
-
- - -
- Michael Schuerig
- mailto:uzs90z@uni-bonn.de
- http://www.rhrz.uni-bonn.de/~uzs90z/
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 24 Oct 1996 01:48:05 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- Andrew Welch replied:
-
- >> Is there a way to flush volumes from inside MacsBug? My intention, of
- >> course, is to write the cache contents to disk after crashing into
- >> MacsBug, but I don't necessarily want to restart (with rs).
- >
- >I suppose you could always write a 'dcmd' that attempts to do this.
-
- Just remember that because the File Manager may be busy and MacsBug has
- the system stopped, attempting to flush a volume from within MacsBug may
- just lock up your system completely.
-
- - Jim Luther
-
- ---------------------------
-
- >From wardle@physics.usyd.edu.au (Mark Wardle)
- Subject: Ftnchek 2.9.4 as an MPW tool anyone?
- Date: 18 Oct 1996 05:54:00 GMT
- Organization: RCfTA, U. Sydney
-
- In article <onm010-1510961000580001@mueller.nucmed.medizin.uni-essen.de>,
- onm010@uni-essen.de (Dr. Stefan P. Mueller) wrote:
-
- >
- > We would like to have a Macintosh version of ftnchek 2.9.4 (preferably a
- > fat binary). The distribution includes a makefile for the Macintosh using
- > MPW C. Unfortunately, we don't have this compiler available here. Has
- > anybody with MPW C built the new version and would be willing to make the
- > Mac version available?
- >
-
-
- Any chance of somebody making an updated MPW tool (68k) available?
- The version at switch is 2.7, I believe.
-
- Are there any other fortran77-related MPW tools I should know about?
-
- Thanks!
-
- +++++++++++++++++++++++++++
-
- >From m.evrard@fusion.rma.ac.be (M.Evrard)
- Date: Mon, 21 Oct 1996 11:25:09 +0100
- Organization: Royal Military Academy (ERM/KMS), Brussels
-
- In article <wardle-1810961555560001@mephistopheles.physics.usyd.edu.au>,
- wardle@physics.usyd.edu.au (Mark Wardle) wrote:
-
- >
- > Any chance of somebody making an updated MPW tool (68k) available?
- > The version at switch is 2.7, I believe.
- >
-
- I uploaded this weekend the MPW tool version to R.Moniot (the author of ftnchek)
- and it should appear very soon at the usual places.
-
- >
- > Thanks!
-
- Never mind.
-
-
- Michel Evrard
-
- +++++++++++++++++++++++++++
-
- >From moniot@sobolev.dsm.fordham.edu (Robert Moniot)
- Date: 21 Oct 1996 19:57:22 GMT
- Organization: Fordham University/FCLC
-
- The Macintosh version of ftnchek 2.9.4 built by Michel Evrard is
- available:
- ftp://ftp.dsm.fordham.edu/pub/ftnchek2.9/ftnchek294.mpw.hqx
-
- I'll leave it to others to upload this to the usual Mac sites, since I
- am not well acquainted with the Mac world.
-
- The PostScript manual is in the same ftp directory, named
- ftnchek-2.9.4.ps (uncompressed) and ftnchek-2.9.4.ps.gz (gzipped).
-
- Reports of problems with this version should probably be sent to me
- rather than Evrard.
- --
-
- Bob Moniot email: moniot@mary.fordham.edu
- Fordham University moniot@dsm.fordham.edu
- Fordham College at Lincoln Center URL: http://www.dsm.fordham.edu/~moniot/
- New York, NY 10023 phone: (212) 636-6311
-
- +++++++++++++++++++++++++++
-
- >From moniot@sobolev.dsm.fordham.edu (Robert Moniot)
- Date: 23 Oct 1996 01:40:47 GMT
- Organization: Fordham University/FCLC
-
- The copy of the PostScript manual for ftnchek 2.9.4 that I placed on
- our ftp server on Monday was corrupted. The copy that is there now is
- correct. Sorry for any inconvenience caused by this mistake. The URL
- for it is
- ftp://ftp.dsm.fordham.edu/pub/ftnchek2.9/ftnchek-2.9.4.ps
-
- The manual included with the source code in ftnchek-2.9.4.tar.gz was
- and is OK.
- --
-
- Bob Moniot email: moniot@mary.fordham.edu
- Fordham University moniot@dsm.fordham.edu
- Fordham College at Lincoln Center URL: http://www.dsm.fordham.edu/~moniot/
- New York, NY 10023 phone: (212) 636-6311
-
- ---------------------------
-
- >From winterp@spot.Colorado.EDU (WINTER PAUL RUDOLPH)
- Subject: GWorld problem
- Date: 22 Oct 96 21:55:11 GMT
- Organization: University of Colorado at Boulder
-
- I noticed the tail of a thread on this topic, so I apologize for bringing
- it up again, but...
-
- I am having a problem with my GWorld. The program opens a window, creates
- a GWorld, draws in the GWorld, and then opies the contents to the window.
- The sequence of calls looks like this:
-
- PlotWndw = GetNewWindow(WndwID,nil,-1)
- call SetPort(PlotWndw)
- myErr = NewGWorld(%ref(myFrame),0,wndwRect,nil,nil,pixPurge)
- call GetGWorld(%ref(oldGWorld),%ref(oldDev))
- call SetGWorld(myFrame,nil)
- call EraseRect(myFrame.p^.portRect)
-
- Plot the graph in the off-scren window
-
- call SetGWorld(oldGWorld,oldDev)
- call CopyBits(%ref(myFrame.p^.portPixMap.h^.p^),PlotWndw.p^.portBits,myFrame,p^.portRect,wndwRect,srcCopy,nil)
- call SetPort(PlotWndw)
-
- I don't dispose of the off-screen world because I use it for updating the
- graph later on. I enter the above code listing at the call to GetGWorld, do
- the updating (rescale the axis, highlight a peak, other things) where the
- graph is plotted, and then do the SetGWorld, CopyBits, etc.
-
- The record myFrame is kept in memory after the GWorld is created until
- the window is disposed.
-
- I also access the off-screen world to update the window in response to an
- update event:
-
- call GetPort(%ref(oldPort))
- WndwPtr.p = theEvent.message
- if (WndwPtr.p.eq.PlotWndw.p) then
- call SetPort(wndwPtr)
- call BeginUpdate(WndwPtr)
- call CopyBits(%ref(myFrame.p^.portPixMap.h^.p^),wndwPtr.p^.portBits,myFrame.p^.portRect,wndwRect,srcCopy,nil)
- call DrawControls(WndwPtr)
- call EndUpdate(WndwPtr)
- call SetPort(oldPort)
- end if
-
- I do this same sequence for a different window in this program, and there is
- never any problem. However, with my plot window, one of the options is to
- save the data. I open the standard dialog window for entering a file, and
- after I close it, the region of the plot window which was behind the dialog
- box doesn't draw correctly. Instead, it comes out a spolthy purple-green-red
- mix. But the program doesn't crash. However, if I try to use any controls
- which force a redrawing of the window, the program freezes. The sequence of
- events is this:
-
- 1) Create PlotWndw and GWorld as above.
- 2) Save the data, which sends the code through the Update loop.
- 3) Try any action which forces a redraw of the window. The code executes:
- call GetGWorld(%ref(oldGWorld),%ref(oldDev))
- call SetGWorld(myFrame,nil)
- call EraseRect(myFrame.p^.portRect)
- The code crashes on this call. I have checked the pointers to all the windows
- etc;, they all seem to be fine. I have run the code so that it opens a
- different dialog in front of the window; it runs fine on the redraw, although
- it doesn't go through the Update loop first. I have opened th other window
- (which goes through the same steps as this window), and it runs fine. And
- the strangest part: when I do a dump of all variables (my compilier has a
- call which does this), the problem goes away and the program doesn't crash.
-
- Any thoughts? I'm working on stripping out all but the key calls so I can
- try to isolate the key variables, but this could take time. Any help would
- be greatly appreciated.
-
- Thanks
- Paul Winter
-
-
- +++++++++++++++++++++++++++
-
- >From jimmerkel@aol.com (Jim Merkel)
- Date: 22 Oct 1996 22:09:06 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- winterp@spot.Colorado.EDU (WINTER PAUL RUDOLPH)
- wrote:
-
- [snip]
- >The sequence of calls looks like this:
-
- >PlotWndw = GetNewWindow(WndwID,nil,-1)
- >call SetPort(PlotWndw)
- >myErr = >NewGWorld(%ref(myFrame),0,wndwRect,nil,nil,pixPurge)
- >call GetGWorld(%ref(oldGWorld),%ref(oldDev))
- >call SetGWorld(myFrame,nil)
- >call EraseRect(myFrame.p^.portRect)
-
- >Plot the graph in the off-scren window
-
- >call SetGWorld(oldGWorld,oldDev)
- >call
- >CopyBits(%ref(myFrame.p^.portPixMap.h^.p^),PlotWndw.p^.p>ortBits,myFrame,
- p^.portRect,wndwRect,srcCopy,nil)
- >call SetPort(PlotWndw)
-
- If you are using GWorlds, you should not use GetPort() or SetPort() in
- your code. Use GetGWorld() and SetGWorld() for both the GWorld and the
- Window. Using SetPort() could be causing some of your problems
-
- Jim Merkel
-
- +++++++++++++++++++++++++++
-
- >From imp@iglou1.iglou.com (Indigo Moon Productions, Inc.)
- Date: Thu, 24 Oct 1996 12:18:47 GMT
- Organization: IgLou Internet Services (1-800-436-4456)
-
- winterp@spot.Colorado.EDU (WINTER PAUL RUDOLPH) writes:
-
- >I noticed the tail of a thread on this topic, so I apologize for bringing
- >it up again, but...
-
-